﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DTO;
using System.Data;
using System.Data.SqlClient;

namespace DAO
{
    public class ChucVuDAO
    {
        public static List<ChucVu> Select_All()
        {
            List<ChucVu> list = new List<ChucVu>();
            String strSql = "select * from ChucVu ";

            try
            {
                DataTable dt = SqlDataAccessHelper.ExcuteQuery(strSql);
                foreach (DataRow dr in dt.Rows)
                {
                    ChucVu emp = new ChucVu();
                    emp.MaChucVu = dr["MaChucVu"].ToString();
                    emp.TenChucVu = dr["TenChucVu"].ToString();
                    list.Add(emp);
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return list;
        }
    }
}
